﻿@{
    Layout = "~/Views/Shared/_Dialog.cshtml";
}
<img src="@(ViewBag.qrCodeImageUrl)" />
@section footerScript{
    <script type="text/javascript">
        var parent = artDialog.open.origin;

        function save() {

            var cover = FlashPay.UI.Mask({
                obj: $("body"),
                opacity: 0.5
            });

            FlashPay.Util.Ajax({
                type: "POST",
                url: "/Business/GoogleVerify",
                data: { secretKey:'@(ViewBag.secretKey)'},
                success: function (res) {
                    if (res.success) {
                        cover.Remove();
                        FlashPay.UI.DialogOpener().doSearch();
                        FlashPay.UI.CloseDialog();
                    } else {
                        cover.Remove();
                        FlashPay.UI.Tip_short_warning("操作失败！" + res.message);
                    }
                },
                error: function (json) {
                    cover.Remove();
                    FlashPay.UI.Tip_warning("操作失败！请查看网络，请重试。");
                }
            });

        }
    </script>
}